﻿//
// Copyright (c) 2009-2010 Intrepid Services, LLC.  All rights reserved.
// Use, duplication, or modification subject to license, consulting, and/or employment agreement(s).
//
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;


namespace ConstructionBidOnline.Biz
{
	/// <summary>
	/// Utility class used to easily log debug or trace info to a disk file.
	/// </summary>
	public class FileLogger
	{
		#region Public Methods

		public static void AppendLogEntry(string logFileFQN, string logEntry)
		{
			if (logFileFQN.StartsWith("~"))
				logFileFQN = System.Web.HttpContext.Current.Server.MapPath(logFileFQN);

			try
			{
				File.AppendAllText(logFileFQN, logEntry);
			}
			catch (Exception ex)
			{
				string msg = ex.Message;
			}
		}

		#endregion
	}
}
